#ifndef _csStream_h_
#define _csStream_h_

/********************************************************************
	created:	2009/11/05
	created:	5:11:2009   18:21
	filename: 	e:\csEngine\csCoreLib\src\io\csStream.h
	file path:	e:\csEngine\csCoreLib\src\io
	file base:	csStream
	file ext:	h
	author:		dongchengok
	
	purpose:	base stream
*********************************************************************/
#include "csType.h"
#include "csString.h"

class csStream
{
public:
	csStream();
	virtual ~csStream(){};

	bool		canRead();
	bool		canWrite();

	void		seekBegin(s32 offset);
	void		seekCurrent(s32 offset);
	void		seekEnd(s32 offset);

	s32			getPosition() const;
	s32			getSize() const;

	void		read(void* buf, u32 size) {}
	void		write(const void* buf, u32 size);
	void		flush();
	bool		eof();

protected:
	s32			m_size;

};

//------------------------------------------------------------------------
csINLINE
csStream::csStream()
:m_size(0)
{

}

//------------------------------------------------------------------------
csINLINE s32
csStream::getSize() const
{
	return m_size;
}

#endif // _csStream_h_